﻿using System;
using TMPro;
using UnityEngine;

namespace MrPP.SerriedCabinet
{
    public class MenuItem : MonoBehaviour
    {
       
        private int id_ = -1;
        [SerializeField]
        private TextMeshPro _text;

        public CabinetGroup.ItemData data {

            get {
                return data_;
            }
        }
        public string text {
            set {
                _text.text = value;
            }
        }
        private CabinetGroup.ItemData data_;
        public void setup(CabinetGroup.ItemData data, int id)
        {
            data_ = data;
            this.text = data.text;
            id_ = id;
        }
      //  public void doClick() {
      //      onClick?.Invoke(data_);
      //  }

    }
}